package com.beifu.manager.api.controller;

import com.mds.manager.model.User;
import com.utils.ResponseHelp;
import org.apache.log4j.Logger;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping(value="/demo/api")
public class DemoController {

	private Logger Log = Logger.getLogger(DemoController.class);

	/**
	 * @param model
	 * @return
	 */
	@RequestMapping(value="/demo")
	public String login() {
		List<User> userList = new ArrayList<User>();
		User user = new User();
		user.setAddress("内蒙古自治区");
		User user1 = new User();
		user.setAddress("河南省");
		userList.add(user1);
		try {
			List a = null;
			a.add("dfsdf");
		}catch (Exception e) {
//			return ResponseHelp.responseApiErrorText("1000", "异常信息");
		}
		return ResponseHelp.responseApiSuccessText(userList);
	}



}
